<extend name="./Application/Common/View/block/base.php" />
<block name="header">
    <include file="./Application/Admin/View/block/easyui_header.php" />
</block>
<block name="bdoy">
    <body>
    <input type="button" name="back" value="{:LANG('confirm')}" onclick="javascript:winBack();" />
    <div class="easyui-panel" style="padding:5px;height: 100%;">
            <ul id="tt" class="easyui-tree" data-options="url:'/Manage/AdminMobileAdmin/get_tree_json?ids={$_GET['ids']}',method:'get',animate:true,checkbox:true"></ul>
        </div>
    </body>
</block>
<block name="footExtendJs">
    <script type="text/javascript">
        function winBack(){
            if(window.opener) {
                var checked = getChecked_text();
                var ids = getChecked_id();
                fWindowText1 = window.opener.document.getElementById("opr");
                fWindowText1.value = checked;
                fWindowText2 = window.opener.document.getElementById("opr_ids");
                fWindowText2.value = ids;
                window.close();
            }
        }

        function getChecked_text(){
            var nodes = $('#tt').tree('getChecked');
            var s = '';
            for(var i=0; i<nodes.length; i++){
                if (s != '') s += ',';
                s += nodes[i].text;
            }
            return s;
        }
        function getChecked_id(){
            var nodes = $('#tt').tree('getChecked');
            var s = '';
            for(var i=0; i<nodes.length; i++){
                if (s != '') s += ',';
                s += nodes[i].id;
            }
            s = ','+s+',';
            return s;
        }
    </script>


</block>
